package com.castle.fortress.admin.oa.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.util.Date;

import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 上下班考勤记录 实体类
 *
 * @author whc
 * @since 2022-11-04
 */
@Data
@ApiModel(value = "attendanceRecord对象", description = "上下班考勤记录")
public class AttendanceRecordDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "唯一ID")
    @JsonProperty("id")
    private Long id;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "打卡规则id")
    @JsonProperty("settId")
    private Long settId;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "所属部门")
    @JsonProperty("deptId")
    private Long deptId;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "员工ID")
    @JsonProperty("userId")
    private Long userId;
    @ApiModelProperty(value = "考勤日期")
    @JsonProperty("date")
    private String date;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @ApiModelProperty(value = "打卡时间")
    @JsonProperty("clockIn")
    private Date clockIn;
    @ApiModelProperty(value = "考勤类型")
    @JsonProperty("type")
    private Integer type;
    @ApiModelProperty(value = "标准时间（规则的时间）")
    @JsonProperty("gmtTime")
    private String gmtTime;
    @ApiModelProperty(value = "考勤时间 冗余字段 统计时间用")
    @JsonProperty("attendanceTime")
    private String attendanceTime;
    @ApiModelProperty(value = "打卡详细地址")
    @JsonProperty("address")
    private String address;
    @ApiModelProperty(value = "打卡经纬度")
    @JsonProperty("range")
    private String range;
    @ApiModelProperty(value = "状态")
    @JsonProperty("status")
    private Integer status;
    @ApiModelProperty(value = "是否删除")
    @JsonProperty("isDeleted")
    private Integer isDeleted;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "创建人")
    @JsonProperty("createUser")
    private Long createUser;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @ApiModelProperty(value = "创建时间")
    @JsonProperty("createTime")
    private Date createTime;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "更新人")
    @JsonProperty("updateUser")
    private Long updateUser;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @ApiModelProperty(value = "更新时间")
    @JsonProperty("updateTime")
    private Date updateTime;
    @ApiModelProperty(value = "创建者姓名")
    @JsonProperty("createUserName")
    private String createUserName;
    @JsonProperty("deptIdName")
    private String deptIdName;

    //筛选用的
    @JsonProperty("username")
    private String username;

    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date limitStartTime;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date limitEndTime;

    /**
     * 有数据权限的部门 筛选用
     */
    private List<Long> authDept;

}
